<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>添加客户信息</title>
	<link href="<%=path%>/css/style_min.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/core.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/form.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/UsersSelect.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/xWindowPanel.css" rel="stylesheet" type="text/css"/>
    <link href="<%=path%>/css/xToolbar.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
    input { width: 180px;}
    textarea { width: 478px; height: 40px;}
    select { width: 188px;}
    .n { text-align: right;}
    </style>
  </head>
  <body>
    <form name="customerForm" id="customerForm" action="<%=path%>/sales/customer/save.t4m" class="form" method="post">
      <div class="form-group">基本信息</div>
      <table class="form-table" cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td class="form-left"><span class="form-required">*</span>客户编号</td>
          <td class="form-right"><input type="text" name="customer.code" class="text required"/></td>
          <td class="form-left">助记码</td>
          <td class="form-right"><input type="text" name="customer.helpCode" class="text"/></td>
        </tr>
        <tr>
          <td class="form-left"><span class="form-required">*</span>客户名称</td>
          <td class="form-right"><input type="text" name="customer.name" class="text required"/></td>
          <td class="form-left">业务员</td>
          <td class="form-right"><input type="hidden" name="customer.operator.id" id="operatorId"/></td>
        </tr>
        <tr>
          <td class="form-left"><span class="form-required">*</span>客户类别</td>
          <td class="form-right"><s:select name="customer.type.id" list="typeList" listKey="id" listValue="name"/></td>
          <td class="form-left">所属地区</td>
          <td class="form-right"><s:select name="customer.region.id" list="regionList" listKey="id" listValue="name"/></td>
        </tr>
        <tr>
          <td class="form-left">备注</td>
          <td class="form-right" colspan="3"><textarea class="textarea" name="customer.remark"></textarea></td>
        </tr>
      </table>
      <div class="form-group">联系方式</div>
      <table class="form-table" cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td class="form-left"><span class="form-required">*</span>联系人</td>
          <td class="form-right"><input type="text" name="customer.linkman" class="text required"/></td>
        </tr>
        <tr>
          <td class="form-left"><span class="form-required">*</span>电话号码</td>
          <td class="form-right"><input type="text" name="customer.phone" class="text required"/></td>
          <td class="form-left"><span class="form-required">*</span>手机号码</td>
          <td class="form-right"><input type="text" name="customer.mobile" class="text required"/></td>
        </tr>
        <tr>
          <td class="form-left">传真号码</td>
          <td class="form-right"><input type="text" name="customer.fax" class="text"/></td>
          <td class="form-left"><span class="form-required">*</span>E-mail</td>
          <td class="form-right"><input type="text" name="customer.email" class="text required"/></td>
        </tr>
        <tr>
          <td class="form-left">通讯地址</td>
          <td class="form-right" colspan="3"><textarea class="textarea" name="customer.address"></textarea></td>
        </tr>
        <tr>
          <td class="form-left">收货地址</td>
          <td class="form-right" colspan="3"><textarea class="textarea" name="customer.takeAddress"></textarea></td>
        </tr>
      </table>
      <!-- 
      <div class="form-group">财务属性</div>
      <table class="form-table" cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td class="form-left">付款方式</td>
          <td class="form-right"><s:select name="customer.payType.id" list="payTypeList" listKey="id" listValue="name"/></td>
          <td class="form-left">折扣率</td>
          <td class="form-right"><input type="text" name="customer.discount" class="text n" style="width:170px;" value="0.00"/>%</td>
        </tr>
        <tr>
          <td class="form-left">账期(天)</td>
          <td class="form-right"><input type="text" name="customer.payDay" class="text"/></td>
          <td class="form-left">信用额度</td>
          <td class="form-right"><input type="text" name="customer.credit" class="text n" value="0.00"/></td>
        </tr>
        <tr>
          <td class="form-left">纳税识别号</td>
          <td class="form-right"><input type="text" name="customer.payCode" class="text"/></td>
          <td class="form-left">开票类型</td>
          <td class="form-right"><s:select name="customer.billType.id" list="billTypeList" listKey="id" listValue="name"/></td>
        </tr>
        <tr>
          <td class="form-left">开户银行</td>
          <td class="form-right"><input type="text" name="customer.bank" class="text"/></td>
          <td class="form-left">开户帐号</td>
          <td class="form-right"><input type="text" name="customer.bankAccount" class="text"/></td>
        </tr>
      </table>
       -->
      <s:hidden name="tabId"/>
      <s:hidden name="windowPanelId"/>
    </form>
    <script src="<%=path%>/js/prototype_for_validation.js" type="text/javascript"></script>
    <script src="<%=path%>/js/validation_cn.js" type="text/javascript"></script>
    <script src="<%=path%>/js/core.js" type="text/javascript"></script>
    <script src="<%=path%>/js/share.js" type="text/javascript"></script>
    <script src="<%=path%>/js/jquery.js" type="text/javascript"></script>
    <script src="<%=path%>/js/Validate.js" type="text/javascript"></script>
    <script src="<%=path%>/js/UsersSelect.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xWindowPanel.js" type="text/javascript"></script>
    <script src="<%=path%>/js/Draggable.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xToolbar.js" type="text/javascript"></script>
    <script src="<%=path%>/js/xToolbar.items.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
  	  var valid = new Validation('customerForm',{immediate:true,stopOnFirst : true});
      new UsersSelect({
        url : '<%=path%>/system/ajax/listUsersByCondition.t4m',
        inputId : 'operatorId',
        title : '选择业务员',
        width : 184,
        multiple : false
      });
    });
    </script>
  </body>
</html>